#! /bin/sh
###
# -*- mode: bash -*-
###
#
# (c) 2000-2007 Wijnand Modderman <wijnand at tehmaze dot com>
# All rights reserved. See docs/LICENSE
#
###
#
# Simple shellscript to stop the bot
#

__revision__='$Hg:$'
PID=`cat ddb.pid 2>/dev/null`

if test -z "${PID}"; then
    echo "DDB not running"
else
    ps $PID >/dev/null
    if test $? -eq 0; then    
        kill $PID 2>/dev/null
        if test $? -gt 0; then
            echo "DDB kill failed"
        else
            echo "DDB stopped"
        fi
    else
        echo "DDB not running"
    fi
fi

# vim:ts=4:sw=4:et:
